package com.reqresp; /**
 * @author wzm
 * @create 2023-09-19 16:47
 * project_name:javaweb2308
 */

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/rs02")
public class Servlet002 extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request, response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("我是窗口B,你好，请出示你的缴费单");
        //获取携带的数据
        System.out.println(request.getAttribute("jfd"));

        //办理结束你去index.jsp看看吧
        request.getRequestDispatcher("/WEB-INF/index.jsp").forward(request,response);

    }
}
